{extend name="layout" /}
{block name="content"}
  <div class="row">
    <div class="col-xs-3">
      <form>
      <div class="input-group input-group-sm">
          <input type="text" class="form-control input-sm" name="keywords">
          <span class="input-group-btn">
            <button type="button" class="btn btn-info btn-flat searchBtn" pageid="pages">搜  索</button>
            <!-- <button type="button" class="btn btn-danger btn-flat cocoModal" isForm url="{:url('search')}">高级搜索</button> -->
          </span>
      </div>
      <input type="hidden" name="fieldset" value="keywords-name|title-like">
      </form>
    </div>
    <div class="col-xs-9" style="text-align: right">
      <button type="button" class="btn btn-success btn-sm cocoModal" isForm url="{:url('add')}" title="新增项目"><i class="fa fa-plus"></i> 新增</button>
      <button type="button" class="btn btn-danger btn-sm cocoAjax" confirm="确定要删除吗？" checkItem="1:0" ajaxUrl="{:url('data_delete',array('model'=>$model))}"><i class="fa fa-remove"></i> 删除</button>
      <button type="button" class="btn btn-default btn-sm cocoAjax" confirm="确定要更新缓存吗？" ajaxUrl="{:url('data_cache',array('model'=>$model))}"><i class="fa fa-retweet"></i> 更新缓存</button>
    </div>
  </div>
  <table class="layui-table" lay-data="{height: 'full-75', cellMinWidth: 80, page: true, limit:30, url:'{:url('data_show',['model'=>'AppVersion'])}'}" lay-filter="lists">
  <thead>
    <tr>
      <th lay-data="{type:'checkbox'}">ID</th>
      <th lay-data="{field:'id', sort: true}">ID</th>
      <th lay-data="{field:'os'}">终端类型</th>
      <th lay-data="{field:'version'}">版本号</th>
      <th lay-data="{field:'number'}">内部版本号</th>
      <th lay-data="{field:'dateline'}">发布时间</th>
      <th lay-data="{fixed: 'right', width:150, align:'center', toolbar: '#barDemo'}">操作</th>
    </tr>
  </thead>
</table>
<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
{/block}